Author: Michael Karcher <debian@mkarcher.dialup.fu-berlin.de>
Description: Expresses access to bitfield as 32 bit variable using a union to
 not violate the strict aliasing rule. The code is still inherently
 non-portable.

--- unace-nonfree-2.5.orig/source/apps/exe/acefuncs/acefuncs.c
+++ unace-nonfree-2.5/source/apps/exe/acefuncs/acefuncs.c
@@ -33,8 +33,10 @@ CHAR      ShortStr[80],
           OutputStr[160];
 PCHAR     OutputFileName;
 INT       I;
-tBASE_DOSFUNCS_FileTime
-          FileTime;
+union {
+tBASE_DOSFUNCS_FileTime Fields;
+ULONG                   Raw;
+} FileTime;
 
   BASE_FILELIST_Init();
   BASE_FILELIST_VolumeCreate();
@@ -79,7 +81,7 @@ tBASE_DOSFUNCS_FileTime
 
         APPS_EXE_CONVERT_MakeStrShorter(ShortStr, OutputFileName, 35);
 
-        *(PULONG) &FileTime = BASE_ARCBLK.Header.File.FTIME;
+        FileTime.Raw = BASE_ARCBLK.Header.File.FTIME;
 
         BASE_STATE.SummaryUnComprBytes += BASE_ARCBLK.Header.File.SIZE;
         BASE_STATE.SummaryComprBytes   += BASE_ARCBLK.Header.File.PSIZE;
@@ -87,8 +89,9 @@ tBASE_DOSFUNCS_FileTime
 
         sprintf(
           OutputStr, "%2d.%2d.%2d_%2d:%2d %c%c%s %s %4d%% %c%s",
-          FileTime.Day, FileTime.Month, (80 + FileTime.Year) % 100,
-          FileTime.Hour, FileTime.Minute,
+          FileTime.Fields.Day, FileTime.Fields.Month,
+          (80 + FileTime.Fields.Year) % 100,
+          FileTime.Fields.Hour, FileTime.Fields.Minute,
           BASE_ARCBLK.Header.File.HEAD_FLAGS & BASE_ACESTRUC_FLAG_SPLITBEFORE ?
             '\x11' : ' ',
           BASE_ARCBLK.Header.File.HEAD_FLAGS & BASE_ACESTRUC_FLAG_SPLITAFTER  ?
--- unace-nonfree-2.5.orig/source/base/all/archives/ace/ace.c
+++ unace-nonfree-2.5/source/base/all/archives/ace/ace.c
@@ -183,13 +183,13 @@ tLFN      ArchiveFileName;
         break;
       }
 
-      BASE_ARCHIVES_READ.FileData[BASE_ARCHIVES_READ.FileNumber].Size       =
+      BASE_ARCHIVES_READ.FileData[BASE_ARCHIVES_READ.FileNumber].Size        =
         BASE_ARCBLK.Header.File.SIZE;
 
-      BASE_ARCHIVES_READ.FileData[BASE_ARCHIVES_READ.FileNumber].PackedSize =
+      BASE_ARCHIVES_READ.FileData[BASE_ARCHIVES_READ.FileNumber].PackedSize  =
         BASE_ARCBLK.Header.File.PSIZE;
 
-      BASE_ARCHIVES_READ.FileData[BASE_ARCHIVES_READ.FileNumber].Time       =
+      BASE_ARCHIVES_READ.FileData[BASE_ARCHIVES_READ.FileNumber].Time.Fields =
         BASE_DOSFUNCS_CalcFileTime(BASE_ARCBLK.Header.File.FTIME);
 
       Attributes |=
--- unace-nonfree-2.5.orig/source/base/all/filelist/filelist.c
+++ unace-nonfree-2.5/source/base/all/filelist/filelist.c
@@ -242,7 +242,7 @@ tBASE_LFN_DBL
     {
       BASE_FILELIST.ListFileData[BASE_FILELIST.Number].Size = FileSize;
 
-      BASE_FILELIST.ListFileData[BASE_FILELIST.Number].Time = 
+      BASE_FILELIST.ListFileData[BASE_FILELIST.Number].Time.Fields = 
         BASE_DOSFUNCS_CalcFileTime(FileTime);
 
       if ((BASE_FILELIST.ListFileData[BASE_FILELIST.Number].Attr = Attr)
@@ -397,7 +397,7 @@ tLFN	  PureFileName;
     if (BASE_PATHFUNC_WildCardCheck(ListPosition, PureFileName + AddDirLen))
     {
       BASE_FILELIST_AddFile(FileName, FileData.Size,
-                       *(PULONG) &FileData.Time, FileData.Attr);
+                       FileData.Time.Raw, FileData.Attr);
 
       return;
     }
--- unace-nonfree-2.5.orig/source/base/all/filelist/filelist.h
+++ unace-nonfree-2.5/source/base/all/filelist/filelist.h
@@ -31,8 +31,11 @@
 
 typedef struct
 {
-  tBASE_DOSFUNCS_FileTime
-          Time;
+  union {
+    tBASE_DOSFUNCS_FileTime
+          Fields;
+    ULONG Raw;
+  } Time;
   ULONGLONG
           Size,
           PackedSize;
